home *** CD-ROM | disk | FTP | other *** search
/ Freelog 22 / freelog 22.iso / Prog / Djgpp / GPC2952B.ZIP / info / gpc.i14 < prev    next >
Encoding:
Text File  |  2001-02-09  |  50.1 KB  |  3,258 lines

  1. This is gpc.info, produced by makeinfo version 4.0 from gpc.texi.
  2.  
  3. INFO-DIR-SECTION GNU programming tools
  4. START-INFO-DIR-ENTRY
  5. * GPC: (gpc).                   The GNU Pascal Compiler.
  6. END-INFO-DIR-ENTRY
  7. INFO-DIR-SECTION Individual utilities
  8. START-INFO-DIR-ENTRY
  9. * GPC: (gpc)Invoking GPC.       The GNU Pascal Compiler.
  10. END-INFO-DIR-ENTRY
  11.  
  12.    This file documents the GNU Pascal Compiler.
  13.  
  14.    Copyright (C) 1988, 1996-2001 Free Software Foundation, Inc.
  15.  
  16.    Permission is granted to make and distribute verbatim copies of this
  17. manual provided the copyright notice and this permission notice are
  18. preserved on all copies.
  19.  
  20.    Permission is granted to copy and distribute modified versions of
  21. this manual under the conditions for verbatim copying, provided also
  22. that the sections entitled "GNU General Public License", "The GNU
  23. Project", "The GNU Manifesto" and "Funding for Free Software" are
  24. included exactly as in the original, and provided that the entire
  25. resulting derived work is distributed under the terms of a permission
  26. notice identical to this one.
  27.  
  28.    Permission is granted to copy and distribute translations of this
  29. manual into another language, under the above conditions for modified
  30. versions, except that the sections entitled "GNU General Public
  31. License", "The GNU Project", "The GNU Manifesto" and "Funding for Free
  32. Software" and this permission notice, may be included in translations
  33. approved by the Free Software Foundation instead of in the original
  34. English.
  35.  
  36. 
  37. File: gpc.info,  Node: do,  Next: Double,  Prev: div,  Up: Reference
  38.  
  39. do
  40. ==
  41.  
  42. Synopsis
  43. --------
  44.  
  45.      for ... do
  46.        STATEMENT
  47.    or
  48.      while ... do
  49.        STATEMENT
  50.    or
  51.      with ... do
  52.        STATEMENT
  53.    or
  54.      to begin do
  55.        STATEMENT
  56.    or
  57.      to end do
  58.        STATEMENT
  59.  
  60. Description
  61. -----------
  62.  
  63.    The `do' reserved word is used in combination with other Pascal
  64. keywords in many ways. For description and examples see the relevant
  65. reference sections: `for', `while', `with', `to begin', `to end'.
  66.  
  67. Conforming to
  68. -------------
  69.  
  70.    `do' is defined in ISO-7185 Standard Pascal and supported by all
  71. known Pascal variants.
  72.  
  73. Example
  74. -------
  75.  
  76.    See references.
  77.  
  78. See also
  79. --------
  80.  
  81.    *Note for::, *Note while::, *Note with::, *Note to begin do::, *Note
  82. to end do::.
  83.  
  84. 
  85. File: gpc.info,  Node: Double,  Next: downto,  Prev: do,  Up: Reference
  86.  
  87. Double
  88. ======
  89.  
  90.    (Under construction.)
  91.  
  92. Synopsis
  93. --------
  94.  
  95.      type
  96.        Double = Real;
  97.  
  98. Description
  99. -----------
  100.  
  101.    `Double' is a synonym for the `Real' data type and supported for
  102. compatibility with other compilers.
  103.  
  104. Conforming to
  105. -------------
  106.  
  107.    `Double' is a Borland Pascal extension.
  108.  
  109. Example
  110. -------
  111.  
  112.      program DoubleDemo;
  113.      var
  114.        A: Double;  { There is nothing special with `Double'. }
  115.        B: Real;
  116.      begin
  117.        A := Pi;
  118.        A := B
  119.      end.
  120.  
  121. See also
  122. --------
  123.  
  124. 
  125. File: gpc.info,  Node: downto,  Next: else,  Prev: Double,  Up: Reference
  126.  
  127. downto
  128. ======
  129.  
  130. Synopsis
  131. --------
  132.  
  133.      for VARIABLE := VALUE1 downto VALUE2 do
  134.        STATEMENT
  135.  
  136. Description
  137. -----------
  138.  
  139.    The `downto' reserved word is used in combination with `for' to
  140. build a `for' loop.
  141.  
  142. Conforming to
  143. -------------
  144.  
  145.    `downto' is defined in ISO-7185 Standard Pascal and supported by all
  146. known Pascal variants.
  147.  
  148. Example
  149. -------
  150.  
  151.    See *Note for::.
  152.  
  153. See also
  154. --------
  155.  
  156.    *Note for::.
  157.  
  158. 
  159. File: gpc.info,  Node: else,  Next: Empty,  Prev: downto,  Up: Reference
  160.  
  161. else
  162. ====
  163.  
  164. Synopsis
  165. --------
  166.  
  167.    As part of the `if' ... `then' ... `else' statement:
  168.      if BOOLEAN EXPRESSION then
  169.        STATEMENT1
  170.      else
  171.        STATEMENT2
  172.    or, as part of the `case' ... `else' statement:
  173.      case EXPRESSION of
  174.        SELECTOR: STATEMENT;
  175.        ...
  176.        SELECTOR: STATEMENT
  177.      else
  178.        STATEMENT;
  179.        ...
  180.        STATEMENT
  181.      end
  182.  
  183. Description
  184. -----------
  185.  
  186.    `else' is part of the `if ... then ... else' statement which
  187. provides a possibility to execute statements alternatively.  In the
  188. `case' statement, `else' starts a series of statements which is
  189. executed if no selector fit in EXPRESSION. In this case, `else' is a
  190. synonym for `otherwise'.
  191.  
  192. Conforming to
  193. -------------
  194.  
  195.    `else' in `if' statements is defined in ISO-7185 Standard Pascal and
  196. supported by all known Pascal variants. `else' in `case' statements is
  197. a Borland Pascal extension; ISO-10206 Extended Pascal has `otherwise'
  198. instead.
  199.  
  200. Example
  201. -------
  202.  
  203.      program ElseDemo;
  204.      var
  205.        i: Integer;
  206.      begin
  207.        Write ('Enter a number: ');
  208.        ReadLn (i);
  209.        if i > 42 then
  210.          WriteLn ('The number is greater than 42')
  211.        else
  212.          WriteLn ('The number is not greater than 42')
  213.      end.
  214.  
  215. See also
  216. --------
  217.  
  218.    *Note if::, *Note case::, *Note otherwise::.
  219.  
  220. 
  221. File: gpc.info,  Node: Empty,  Next: end,  Prev: else,  Up: Reference
  222.  
  223. Empty
  224. =====
  225.  
  226.    (Under construction.)
  227.  
  228. Synopsis
  229. --------
  230.  
  231.      function Empty (var F: ANY FILE): Boolean;
  232.  
  233. Description
  234. -----------
  235.  
  236. Conforming to
  237. -------------
  238.  
  239. Example
  240. -------
  241.  
  242. See also
  243. --------
  244.  
  245. 
  246. File: gpc.info,  Node: end,  Next: EOF,  Prev: Empty,  Up: Reference
  247.  
  248. end
  249. ===
  250.  
  251. Synopsis
  252. --------
  253.  
  254.      begin
  255.        STATEMENT;
  256.        STATEMENT;
  257.        ...
  258.        STATEMENT
  259.      end
  260.  
  261. Description
  262. -----------
  263.  
  264.    The reserved word `end' closes a `begin' ... `end'; statement which
  265. joins several STATEMENTS together into one compound statement.
  266.  
  267.    @@ end of a <case> statement @@ end of a record or object declaration
  268. @@ part of a <to end do> module destructor
  269.  
  270. Conforming to
  271. -------------
  272.  
  273.    `end' is defined in ISO-7185 Standard Pascal and supported by all
  274. Pascal variants.
  275.  
  276. Example
  277. -------
  278.  
  279.      program EndDemo;
  280.      begin
  281.        if True then
  282.          WriteLn ('single statement');
  283.        if True then
  284.          begin                     { clamp statement1 ... }
  285.            WriteLn ('statement1');
  286.            WriteLn ('statement2')
  287.          end                       { ... to statement2 }
  288.      end.
  289.  
  290. See also
  291. --------
  292.  
  293.    *Note begin end Compound Statement::, *Note begin::
  294.  
  295. 
  296. File: gpc.info,  Node: EOF,  Next: EOLn,  Prev: end,  Up: Reference
  297.  
  298. EOF
  299. ===
  300.  
  301.    (Under construction.)
  302.  
  303. Synopsis
  304. --------
  305.  
  306.      function EOF (var F: ANY FILE): Boolean;
  307.    or
  308.      function EOF: Boolean;
  309.  
  310. Description
  311. -----------
  312.  
  313. Conforming to
  314. -------------
  315.  
  316.    `EOF' is defined in ISO-7185 Standard Pascal and supported by all
  317. Pascal variants.
  318.  
  319. Example
  320. -------
  321.  
  322. See also
  323. --------
  324.  
  325. 
  326. File: gpc.info,  Node: EOLn,  Next: EpsReal,  Prev: EOF,  Up: Reference
  327.  
  328. EOLn
  329. ====
  330.  
  331.    (Under construction.)
  332.  
  333. Synopsis
  334. --------
  335.  
  336.      function EOLn (var F: ANY FILE): Boolean;
  337.    or
  338.      function EOLn: Boolean;
  339.  
  340. Description
  341. -----------
  342.  
  343. Conforming to
  344. -------------
  345.  
  346.    `EOLn' is defined in ISO-7185 Standard Pascal and supported by all
  347. Pascal variants.
  348.  
  349. Example
  350. -------
  351.  
  352. See also
  353. --------
  354.  
  355. 
  356. File: gpc.info,  Node: EpsReal,  Next: Eq,  Prev: EOLn,  Up: Reference
  357.  
  358. EpsReal
  359. =======
  360.  
  361.    (Under construction.)
  362.  
  363. Synopsis
  364. --------
  365.  
  366. Description
  367. -----------
  368.  
  369. Conforming to
  370. -------------
  371.  
  372.    `EpsReal' is an ISO-10206 Extended Pascal extension.
  373.  
  374. Example
  375. -------
  376.  
  377. See also
  378. --------
  379.  
  380. 
  381. File: gpc.info,  Node: Eq,  Next: Erase,  Prev: EpsReal,  Up: Reference
  382.  
  383. Eq
  384. ==
  385.  
  386.    (Under construction.)
  387.  
  388. Synopsis
  389. --------
  390.  
  391.      function Eq (S1, S2: String): Boolean;
  392.  
  393. Description
  394. -----------
  395.  
  396. Conforming to
  397. -------------
  398.  
  399.    `Eq' is an ISO-10206 Extended Pascal extension.
  400.  
  401. Example
  402. -------
  403.  
  404. See also
  405. --------
  406.  
  407. 
  408. File: gpc.info,  Node: Erase,  Next: Exclude,  Prev: Eq,  Up: Reference
  409.  
  410. Erase
  411. =====
  412.  
  413.    (Under construction.)
  414.  
  415. Synopsis
  416. --------
  417.  
  418.      procedure Erase (var F: ANY FILE);
  419.  
  420. Description
  421. -----------
  422.  
  423. Conforming to
  424. -------------
  425.  
  426.    `Erase' is a Borland Pascal extension.
  427.  
  428. Example
  429. -------
  430.  
  431. See also
  432. --------
  433.  
  434. 
  435. File: gpc.info,  Node: Exclude,  Next: Exit,  Prev: Erase,  Up: Reference
  436.  
  437. Exclude
  438. =======
  439.  
  440.    (Under construction.)
  441.  
  442. Synopsis
  443. --------
  444.  
  445. Description
  446. -----------
  447.  
  448. Conforming to
  449. -------------
  450.  
  451. Example
  452. -------
  453.  
  454. See also
  455. --------
  456.  
  457. 
  458. File: gpc.info,  Node: Exit,  Next: Exp,  Prev: Exclude,  Up: Reference
  459.  
  460. Exit
  461. ====
  462.  
  463. Synopsis
  464. --------
  465.  
  466.      procedure Exit;
  467.  
  468. Description
  469. -----------
  470.  
  471.    `Exit' leaves the currently executed procedure or function.  Note:
  472. If `Exit' is called within the main program, it will be terminated
  473. instantly.
  474.  
  475. Conforming to
  476. -------------
  477.  
  478.    `Exit' is a UCSD Pascal extension. GNU Pascal does not support all
  479. uses of `Exit' but only those defined in Borland Pascal.
  480.  
  481. Example
  482. -------
  483.  
  484.      program ExitDemo;
  485.      
  486.      procedure Foo (Bar: Integer);
  487.      var
  488.        Baz, Fac: Integer;
  489.      begin
  490.        if Bar < 1 then
  491.          Exit;                  { Exit foo }
  492.        Fac := 1;
  493.        for Baz := 1 to Bar do
  494.          begin
  495.            Fac := Fac * Baz;
  496.            if Fac >= Bar then       { Exit foo }
  497.              Exit;
  498.            WriteLn (Bar,' is greater then ', baz, '!, which is equal to ', Fac)
  499.        end
  500.      end;
  501.      
  502.      begin
  503.        Foo (-1);
  504.        Foo (789);
  505.        Exit;                  { Terminates program }
  506.        Foo (987654321)        { This is not executed any more }
  507.      end.
  508.  
  509. See also
  510. --------
  511.  
  512.    *Note Break::, *Note Continue::, *Note Halt::
  513.  
  514. 
  515. File: gpc.info,  Node: Exp,  Next: export,  Prev: Exit,  Up: Reference
  516.  
  517. Exp
  518. ===
  519.  
  520. Synopsis
  521. --------
  522.  
  523.      function Exp (x: Real): Real;
  524.    or
  525.      function Exp (z: Complex): Complex;
  526.  
  527. Description
  528. -----------
  529.  
  530.    The exponential function `Exp' computes the value of e to the power
  531. of x, where the Euler number e = Exp (1) is the base of the natural
  532. logarithm.
  533.  
  534. Conforming to
  535. -------------
  536.  
  537.    The function `Exp' is defined in ISO-7185 Standard Pascal; its
  538. application to complex values is defined in ISO-10206 Extended Pascal.
  539.  
  540. Example
  541. -------
  542.  
  543.      program ExpDemo;
  544.      var
  545.        z: Complex;
  546.      begin
  547.        z := Cmplx (1, - 2 * Pi);  { z = 1 - i * 2 pi }
  548.        z := Exp (z);  { yields e = Exp (1), since Exp ix = Cos (x) + i * Sin(x) }
  549.        WriteLn (Ln (Re (z)) : 0 : 5)  { prints 1 = Ln (Exp (1)) }
  550.      end.
  551.  
  552. See also
  553. --------
  554.  
  555.    *Note Ln::
  556.  
  557. 
  558. File: gpc.info,  Node: export,  Next: exports,  Prev: Exp,  Up: Reference
  559.  
  560. export
  561. ======
  562.  
  563.    (Under construction.)
  564.  
  565. Synopsis
  566. --------
  567.  
  568. Description
  569. -----------
  570.  
  571. Conforming to
  572. -------------
  573.  
  574.    `export' is an ISO-10206 Extended Pascal extension.
  575.  
  576. Example
  577. -------
  578.  
  579. See also
  580. --------
  581.  
  582. 
  583. File: gpc.info,  Node: exports,  Next: Extend,  Prev: export,  Up: Reference
  584.  
  585. exports
  586. =======
  587.  
  588.    Not yet implemented.
  589.  
  590. Synopsis
  591. --------
  592.  
  593. Description
  594. -----------
  595.  
  596. Conforming to
  597. -------------
  598.  
  599.    `exports' is a Borland Pascal extension.
  600.  
  601. Example
  602. -------
  603.  
  604. See also
  605. --------
  606.  
  607. 
  608. File: gpc.info,  Node: Extend,  Next: Extended,  Prev: exports,  Up: Reference
  609.  
  610. Extend
  611. ======
  612.  
  613.    (Under construction.)
  614.  
  615. Synopsis
  616. --------
  617.  
  618.      procedure Extend (var F: ANY FILE; [FileName: String;]
  619.                                          [BlockSize: Cardinal]);
  620.  
  621. Description
  622. -----------
  623.  
  624.    `Extend' opens a file for writing. If the file does not exist, it is
  625. created. If it does exist, the file pointer is positioned after the
  626. last element.
  627.  
  628.    Like `Rewrite', `Reset' and `Append' do, `Extend' accepts an
  629. optional second and third parameter for the name of the file in the
  630. filesystem and, for untyped files, the block size of the file. (For
  631. details, see *Note Rewrite::.)
  632.  
  633. Conforming to
  634. -------------
  635.  
  636.    `Extend' is an ISO-10206 Extended extension. Borland Pascal Pascal
  637. has *Note Append:: instead.  The `BlockSize' parameter is a Borland
  638. Pascal extension.  The `FileName' parameter is a GNU extension.
  639.  
  640. Example
  641. -------
  642.  
  643.      program ExtendDemo;
  644.      var
  645.        Sample: Text;
  646.      begin
  647.        Assign (Sample, 'sample.txt');
  648.        Rewrite (Sample);
  649.        WriteLn (Sample, 'Hello, World!');  { `sample.txt' now has one line }
  650.        Close (Sample);
  651.      
  652.        { ... }
  653.      
  654.        Extend (Sample);
  655.        WriteLn (Sample, 'Hello again!');   { `sample.txt' now has two lines }
  656.        Close (Sample)
  657.      end.
  658.  
  659. See also
  660. --------
  661.  
  662.    *Note Assign::, *Note Reset::, *Note Rewrite::, *Note Update::,
  663. *Note Append::.
  664.  
  665. 
  666. File: gpc.info,  Node: Extended,  Next: extern,  Prev: Extend,  Up: Reference
  667.  
  668. Extended
  669. ========
  670.  
  671.    (Under construction.)
  672.  
  673. Synopsis
  674. --------
  675.  
  676.      type
  677.        Extended = LongReal;
  678.  
  679. Description
  680. -----------
  681.  
  682. Conforming to
  683. -------------
  684.  
  685. Example
  686. -------
  687.  
  688.      program ExtendedDemo;
  689.      var
  690.        a: Extended;
  691.      begin
  692.        a := 42;
  693.        WriteLn (a)
  694.      end.
  695.  
  696. See also
  697. --------
  698.  
  699. 
  700. File: gpc.info,  Node: extern,  Next: external,  Prev: Extended,  Up: Reference
  701.  
  702. extern
  703. ======
  704.  
  705.    (Under construction.)
  706.  
  707. Synopsis
  708. --------
  709.  
  710. Description
  711. -----------
  712.  
  713. Conforming to
  714. -------------
  715.  
  716. Example
  717. -------
  718.  
  719. See also
  720. --------
  721.  
  722. 
  723. File: gpc.info,  Node: external,  Next: Fail,  Prev: extern,  Up: Reference
  724.  
  725. external
  726. ========
  727.  
  728.    (Under construction.)
  729.  
  730. Synopsis
  731. --------
  732.  
  733. Description
  734. -----------
  735.  
  736. Conforming to
  737. -------------
  738.  
  739. Example
  740. -------
  741.  
  742. See also
  743. --------
  744.  
  745. 
  746. File: gpc.info,  Node: Fail,  Next: False,  Prev: external,  Up: Reference
  747.  
  748. Fail
  749. ====
  750.  
  751.    (Under construction.)
  752.  
  753. Synopsis
  754. --------
  755.  
  756. Description
  757. -----------
  758.  
  759. Conforming to
  760. -------------
  761.  
  762. Example
  763. -------
  764.  
  765. See also
  766. --------
  767.  
  768. 
  769. File: gpc.info,  Node: False,  Next: far,  Prev: Fail,  Up: Reference
  770.  
  771. False
  772. =====
  773.  
  774.    (Under construction.)
  775.  
  776. Synopsis
  777. --------
  778.  
  779. Description
  780. -----------
  781.  
  782. Conforming to
  783. -------------
  784.  
  785. Example
  786. -------
  787.  
  788. See also
  789. --------
  790.  
  791. 
  792. File: gpc.info,  Node: far,  Next: file,  Prev: False,  Up: Reference
  793.  
  794. far
  795. ===
  796.  
  797. Synopsis
  798. --------
  799.  
  800. Description
  801. -----------
  802.  
  803.    The `far' directive can be appended to a procedure or function
  804. heading but is ignored by GPC. It is there for Borland compatibility,
  805. only. (Since the GNU compilers provide a flat memory model, the
  806. distinction between `near' and `far' pointers is void.)
  807.  
  808. Conforming to
  809. -------------
  810.  
  811.    `far' is a Borland Pascal extension.
  812.  
  813. Example
  814. -------
  815.  
  816.      program FarDemo;
  817.      
  818.      var
  819.        p: procedure;
  820.      
  821.      {$W-}  { Don't warn about the uselessness of `far' }
  822.      
  823.      procedure Foo; far;  { `far' has no effect in GPC }
  824.      begin
  825.        WriteLn ('Foo')
  826.      end;
  827.      
  828.      begin
  829.        p := Foo;  { Would also work without `far' in GPC. }
  830.        p
  831.      end.
  832.  
  833. See also
  834. --------
  835.  
  836.    *Note near::.
  837.  
  838. 
  839. File: gpc.info,  Node: file,  Next: FileMode,  Prev: far,  Up: Reference
  840.  
  841. file
  842. ====
  843.  
  844.    (Under construction.)
  845.  
  846. Synopsis
  847. --------
  848.  
  849.    In type definitions:
  850.      File of TYPE
  851.    or
  852.      File
  853.  
  854. Description
  855. -----------
  856.  
  857. Conforming to
  858. -------------
  859.  
  860. Example
  861. -------
  862.  
  863. See also
  864. --------
  865.  
  866. 
  867. File: gpc.info,  Node: FileMode,  Next: FilePos,  Prev: file,  Up: Reference
  868.  
  869. FileMode
  870. ========
  871.  
  872.    (Under construction.)
  873.  
  874. Synopsis
  875. --------
  876.  
  877.      var
  878.        FileMode: Integer;
  879.  
  880. Description
  881. -----------
  882.  
  883. Conforming to
  884. -------------
  885.  
  886.    `FileMode' is a Borland Pascal extension.
  887.  
  888. Example
  889. -------
  890.  
  891. See also
  892. --------
  893.  
  894. 
  895. File: gpc.info,  Node: FilePos,  Next: FileSize,  Prev: FileMode,  Up: Reference
  896.  
  897. FilePos
  898. =======
  899.  
  900.    (Under construction.)
  901.  
  902. Synopsis
  903. --------
  904.  
  905.      function FilePos (var F: ANY FILE): Integer;
  906.  
  907. Description
  908. -----------
  909.  
  910. Conforming to
  911. -------------
  912.  
  913.    `FilePos' is a Borland Pascal extension.
  914.  
  915. Example
  916. -------
  917.  
  918. See also
  919. --------
  920.  
  921. 
  922. File: gpc.info,  Node: FileSize,  Next: FillChar,  Prev: FilePos,  Up: Reference
  923.  
  924. FileSize
  925. ========
  926.  
  927.    (Under construction.)
  928.  
  929. Synopsis
  930. --------
  931.  
  932.      function FileSize (var F: ANY FILE): Integer;
  933.  
  934. Description
  935. -----------
  936.  
  937. Conforming to
  938. -------------
  939.  
  940.    `FileSize' is a Borland Pascal extension.
  941.  
  942. Example
  943. -------
  944.  
  945. See also
  946. --------
  947.  
  948. 
  949. File: gpc.info,  Node: FillChar,  Next: Flush,  Prev: FileSize,  Up: Reference
  950.  
  951. FillChar
  952. ========
  953.  
  954.    (Under construction.)
  955.  
  956. Synopsis
  957. --------
  958.  
  959.      procedure FillChar (var Dest; Count: SizeType; Val: Char);
  960.    or
  961.      procedure FillChar (var Dest; Count: SizeType; Val: Byte);
  962.  
  963. Description
  964. -----------
  965.  
  966. Conforming to
  967. -------------
  968.  
  969.    `FillChar' is a UCSD Pascal extension.
  970.  
  971. Example
  972. -------
  973.  
  974. See also
  975. --------
  976.  
  977. 
  978. File: gpc.info,  Node: Flush,  Next: for,  Prev: FillChar,  Up: Reference
  979.  
  980. Flush
  981. =====
  982.  
  983.    (Under construction.)
  984.  
  985. Synopsis
  986. --------
  987.  
  988.      procedure Flush (var F: ANY FILE);
  989.  
  990. Description
  991. -----------
  992.  
  993. Conforming to
  994. -------------
  995.  
  996. Example
  997. -------
  998.  
  999. See also
  1000. --------
  1001.  
  1002. 
  1003. File: gpc.info,  Node: for,  Next: forward,  Prev: Flush,  Up: Reference
  1004.  
  1005. for
  1006. ===
  1007.  
  1008. Synopsis
  1009. --------
  1010.  
  1011.    For ordinal index variables:
  1012.      for ORDINAL VARIABLE := INITIAL VALUE to FINAL VALUE do
  1013.        STATEMENT
  1014.    or
  1015.      for ORDINAL VARIABLE := INITIAL VALUE downto FINAL VALUE do
  1016.        STATEMENT
  1017.  
  1018.    For sets:
  1019.      for SET ELEMENT TYPE VARIABLE in SOME SET do
  1020.        STATEMENT
  1021.  
  1022.    For pointer index variables:
  1023.      for POINTER VARIABLE := INITIAL ADDRESS to FINAL ADDRESS do
  1024.        STATEMENT
  1025.    or
  1026.      for POINTER VARIABLE := INITIAL ADDRESS downto FINAL ADDRESS do
  1027.        STATEMENT
  1028.  
  1029.    @@ Set member iteration
  1030.  
  1031. Description
  1032. -----------
  1033.  
  1034.    The FOR statement is a count loop. For further information see *Note
  1035. for Statement::.
  1036.  
  1037. Conforming to
  1038. -------------
  1039.  
  1040.    `for' is defined in ISO-7185 Standard Pascal and supported by all
  1041. Pascal variants. Iteration of Pointers is a Borland Pascal extension.
  1042. Set member iteration is an ISO-10206 Extended Pascal extension.
  1043.  
  1044. Example
  1045. -------
  1046.  
  1047.      program ForDemo;
  1048.      var
  1049.        CharSet: set of Char;
  1050.        c: Char;
  1051.        n: Integer;
  1052.        Fac: array [0 .. 10] of Integer;
  1053.        PInt: ^Integer;
  1054.      begin
  1055.         CharSet := ['g', 'p', 'c'];
  1056.         for c in CharSet do
  1057.           WriteLn (c);       { prints c g p in three lines }
  1058.         Fac [0] := 1;
  1059.         for n := 1 to 10 do  { computes the factorial of n for n = 0 .. 10 }
  1060.           Fac [n] := Fac [n - 1] * n;
  1061.         {$X+}
  1062.         { prints n! for n = 0 .. 10 }
  1063.         for PInt := @Fac [0] to @Fac [10] do
  1064.           WriteLn (PInt - @Fac [0], '! = ', PInt^)
  1065.      end.
  1066.  
  1067. See also
  1068. --------
  1069.  
  1070.    *Note Set Types::, *Note Pointer Arithmetics::
  1071.  
  1072. 
  1073. File: gpc.info,  Node: forward,  Next: Frac,  Prev: for,  Up: Reference
  1074.  
  1075. forward
  1076. =======
  1077.  
  1078.    (Under construction.)
  1079.  
  1080. Synopsis
  1081. --------
  1082.  
  1083. Description
  1084. -----------
  1085.  
  1086. Conforming to
  1087. -------------
  1088.  
  1089. Example
  1090. -------
  1091.  
  1092. See also
  1093. --------
  1094.  
  1095. 
  1096. File: gpc.info,  Node: Frac,  Next: FrameAddress,  Prev: forward,  Up: Reference
  1097.  
  1098. Frac
  1099. ====
  1100.  
  1101.    (Under construction.)
  1102.  
  1103. Synopsis
  1104. --------
  1105.  
  1106.      function Frac (x: Real): Real;
  1107.  
  1108. Description
  1109. -----------
  1110.  
  1111. Conforming to
  1112. -------------
  1113.  
  1114. Example
  1115. -------
  1116.  
  1117. See also
  1118. --------
  1119.  
  1120. 
  1121. File: gpc.info,  Node: FrameAddress,  Next: FreeMem,  Prev: Frac,  Up: Reference
  1122.  
  1123. FrameAddress
  1124. ============
  1125.  
  1126.    (Under construction.)
  1127.  
  1128. Synopsis
  1129. --------
  1130.  
  1131. Description
  1132. -----------
  1133.  
  1134. Conforming to
  1135. -------------
  1136.  
  1137. Example
  1138. -------
  1139.  
  1140. See also
  1141. --------
  1142.  
  1143. 
  1144. File: gpc.info,  Node: FreeMem,  Next: function,  Prev: FrameAddress,  Up: Reference
  1145.  
  1146. FreeMem
  1147. =======
  1148.  
  1149. Synopsis
  1150. --------
  1151.  
  1152.      procedure FreeMem (var p: Pointer; Size: Cardinal);
  1153.    or
  1154.      procedure FreeMem (var p: Pointer);
  1155.  
  1156. Description
  1157. -----------
  1158.  
  1159.    Releases a chunk of memory previously allocated using `GetMem'.  The
  1160. parameter SIZE is optional, and its value is ignored.
  1161.  
  1162.    Since Extended Pascal's schemata provide a cleaner way to implement
  1163. dynamical arrays and such, we recommend using `GetMem' and `FreeMem'
  1164. only for low-level applications or for interfacing with other languages.
  1165.  
  1166. Conforming to
  1167. -------------
  1168.  
  1169.    `FreeMem' is a Borland Pascal extension. `FreeMem' with only one
  1170. parameter is a GNU Pascal extension.
  1171.  
  1172. Example
  1173. -------
  1174.  
  1175.    *Note GetMem::.
  1176.  
  1177. See also
  1178. --------
  1179.  
  1180.    *Note GetMem::, *Note Schema Types::, *Note Dispose::, *Note Mark::,
  1181. *Note Release::.
  1182.  
  1183. 
  1184. File: gpc.info,  Node: function,  Next: GE,  Prev: FreeMem,  Up: Reference
  1185.  
  1186. function
  1187. ========
  1188.  
  1189.    (Under construction.)
  1190.  
  1191. Synopsis
  1192. --------
  1193.  
  1194. Description
  1195. -----------
  1196.  
  1197. Conforming to
  1198. -------------
  1199.  
  1200. Example
  1201. -------
  1202.  
  1203. See also
  1204. --------
  1205.  
  1206. 
  1207. File: gpc.info,  Node: GE,  Next: Get,  Prev: function,  Up: Reference
  1208.  
  1209. GE
  1210. ==
  1211.  
  1212.    (Under construction.)
  1213.  
  1214. Synopsis
  1215. --------
  1216.  
  1217.      function GE (S1, S2: String): Boolean;
  1218.  
  1219. Description
  1220. -----------
  1221.  
  1222. Conforming to
  1223. -------------
  1224.  
  1225. Example
  1226. -------
  1227.  
  1228. See also
  1229. --------
  1230.  
  1231. 
  1232. File: gpc.info,  Node: Get,  Next: GetMem,  Prev: GE,  Up: Reference
  1233.  
  1234. Get
  1235. ===
  1236.  
  1237.    (Under construction.)
  1238.  
  1239. Synopsis
  1240. --------
  1241.  
  1242.      procedure Get (var F: TYPED FILE);
  1243.  
  1244. Description
  1245. -----------
  1246.  
  1247. Conforming to
  1248. -------------
  1249.  
  1250. Example
  1251. -------
  1252.  
  1253. See also
  1254. --------
  1255.  
  1256. 
  1257. File: gpc.info,  Node: GetMem,  Next: GetTimeStamp,  Prev: Get,  Up: Reference
  1258.  
  1259. GetMem
  1260. ======
  1261.  
  1262. Synopsis
  1263. --------
  1264.  
  1265.      procedure GetMem (var p: Pointeger; Size: Cardinal);
  1266.    or
  1267.      function GetMem (Size: Cardinal): Pointer;
  1268.  
  1269. Description
  1270. -----------
  1271.  
  1272.    Allocates dynamical storage on the heap and returns a pointer to it
  1273. in `p' or as the function result.
  1274.  
  1275.    Since Extended Pascal's schemata provide a cleaner way to implement
  1276. dynamical arrays and such, we recommend using `GetMem' and `FreeMem'
  1277. only for low-level applications.
  1278.  
  1279. Conforming to
  1280. -------------
  1281.  
  1282.    `GetMem' is a Borland Pascal extension.  The use of `GetMem' as a
  1283. function is a GNU Pascal extension.
  1284.  
  1285. Example
  1286. -------
  1287.  
  1288.    The Borland-comatibility unit `Graph' from the `BPcompat' package
  1289. supports a `GetImage' and a `PutImage' procedure which need a variable
  1290. of size `ImageSize' as a buffer.  Since these are "black box" routines,
  1291. the buffer can't reasonably be a schema providing a dynamical array.
  1292. Instead, we have to use `GetMem' and `FreeMem' for dynamical memory
  1293. allocation.
  1294.  
  1295.      program GetMemDemo;
  1296.      var
  1297.        Buffer: Pointer;
  1298.        Size: Cardinal;
  1299.      begin
  1300.        Size := Random (10000); { the size can be determined at run time }
  1301.        Buffer := GetMem (Size);  { or: GetMem (Buffer, Size); }
  1302.        { Do something with Buffer }
  1303.        FreeMem (Buffer)  { or: FreeMem (Buffer, Size) }
  1304.      end.
  1305.  
  1306. See also
  1307. --------
  1308.  
  1309.    *Note FreeMem::, *Note New::, *Note Schema Types::.
  1310.  
  1311. 
  1312. File: gpc.info,  Node: GetTimeStamp,  Next: goto,  Prev: GetMem,  Up: Reference
  1313.  
  1314. GetTimeStamp
  1315. ============
  1316.  
  1317.    (Under construction.)
  1318.  
  1319. Synopsis
  1320. --------
  1321.  
  1322.      procedure GetTimeStamp (var T: TimeStamp);
  1323.  
  1324. Description
  1325. -----------
  1326.  
  1327. Conforming to
  1328. -------------
  1329.  
  1330.    `GetTimeStamp' is an ISO-10206 Extended Pascal extension.
  1331.  
  1332. Example
  1333. -------
  1334.  
  1335. See also
  1336. --------
  1337.  
  1338. 
  1339. File: gpc.info,  Node: goto,  Next: GT,  Prev: GetTimeStamp,  Up: Reference
  1340.  
  1341. goto
  1342. ====
  1343.  
  1344.    (Under construction.)
  1345.  
  1346. Synopsis
  1347. --------
  1348.  
  1349.      goto LABEL
  1350.  
  1351. Description
  1352. -----------
  1353.  
  1354.    The `goto' statement transfers control to statement with the label
  1355. `label'.
  1356.  
  1357. Conforming to
  1358. -------------
  1359.  
  1360. Example
  1361. -------
  1362.  
  1363. See also
  1364. --------
  1365.  
  1366. 
  1367. File: gpc.info,  Node: GT,  Next: Halt,  Prev: goto,  Up: Reference
  1368.  
  1369. GT
  1370. ==
  1371.  
  1372.    (Under construction.)
  1373.  
  1374. Synopsis
  1375. --------
  1376.  
  1377.      function GT (S1, S2: String): Boolean;
  1378.  
  1379. Description
  1380. -----------
  1381.  
  1382. Conforming to
  1383. -------------
  1384.  
  1385. Example
  1386. -------
  1387.  
  1388. See also
  1389. --------
  1390.  
  1391. 
  1392. File: gpc.info,  Node: Halt,  Next: High,  Prev: GT,  Up: Reference
  1393.  
  1394. Halt
  1395. ====
  1396.  
  1397. Synopsis
  1398. --------
  1399.  
  1400.      Halt;
  1401.    or
  1402.      Halt (ExitCode: Integer);
  1403.  
  1404. Description
  1405. -----------
  1406.  
  1407.    `Halt' terminates the program with exitcode 0. If `ExitCode', is
  1408. specified, it is returned by `Halt' on exit.
  1409.  
  1410. Conforming to
  1411. -------------
  1412.  
  1413.    `Halt' is a UCSD Pascal extension.
  1414.  
  1415. Example
  1416. -------
  1417.  
  1418.      program HaltDemo;
  1419.      begin
  1420.        WriteLn ('This string will always be this program''s output.');
  1421.        Halt;  { Terminate right here and right now. }
  1422.        WriteLn ('And this string won''t ever!')
  1423.      end.
  1424.  
  1425. See also
  1426. --------
  1427.  
  1428.    *Note Break::, *Note Continue::, *Note Exit::, *Note Return::, *Note
  1429. goto::.
  1430.  
  1431. 
  1432. File: gpc.info,  Node: High,  Next: if,  Prev: Halt,  Up: Reference
  1433.  
  1434. High
  1435. ====
  1436.  
  1437. Synopsis
  1438. --------
  1439.  
  1440.      function High (ORDINAL TYPE OR VARIABLE): ORDINAL TYPE;
  1441.    or
  1442.      function High (ARRAY TYPE OR VARIABLE): ARRAY INDEX TYPE;
  1443.    or
  1444.      function High (STRING VARIABLE): Integer;
  1445.  
  1446. Description
  1447. -----------
  1448.  
  1449.    For ordinal types or variables of that type, `High' returns the
  1450. highest value a variable of that type can assume.
  1451.  
  1452.    For array types or variables of that type, `High' returns the
  1453. highest index a variable of that type can assume. Note: the result is of
  1454. the same type as the array index is. If the array has more than one
  1455. dimension, `High' returns the highest index in the first dimension.
  1456.  
  1457.    If the argument is a string variable, `High' returns the
  1458. discriminant of the string type (i.e. its capacity).
  1459.  
  1460. Conforming to
  1461. -------------
  1462.  
  1463.    `High' is a Borland Pascal extension.
  1464.  
  1465. Example
  1466. -------
  1467.  
  1468.      program HighDemo;
  1469.      type
  1470.        Colors = (Red, Green, Blue);
  1471.      var
  1472.        Col: array [Colors] of (Love, Hope, Faithfulness);
  1473.        Foo: Colors;
  1474.        Bar: Integer;
  1475.        Baz: String (123);
  1476.      begin
  1477.        Foo := High (Col);              { yields Blue }
  1478.        Bar := Ord (High (Col [Foo]));  { yields Ord (Faithfulness), i.e., 2 }
  1479.        Bar := High (Integer);          { returns highest possible ``Integer'' }
  1480.        Bar := High (Baz)               { returns 123 }
  1481.      end.
  1482.  
  1483. See also
  1484. --------
  1485.  
  1486.    *Note Low::
  1487.  
  1488. 
  1489. File: gpc.info,  Node: if,  Next: Im,  Prev: High,  Up: Reference
  1490.  
  1491. if
  1492. ==
  1493.  
  1494. Synopsis
  1495. --------
  1496.  
  1497.      if BOOLEAN EXPRESSION then
  1498.        STATEMENT
  1499.    or with an alternative statement:
  1500.      if BOOLEAN EXPRESSION then
  1501.        STATEMENT1
  1502.      else
  1503.        STATEMENT2
  1504.  
  1505. Description
  1506. -----------
  1507.  
  1508.    The `if ... then' statement executes STATEMENT1 depending on
  1509. `Boolean expression' being true. If `else' is specified, it continues
  1510. executing STATEMENT2 instead.
  1511.  
  1512. Conforming to
  1513. -------------
  1514.  
  1515.    `if' is defined in ISO-7185 Standard Pascal and supported by all
  1516. Pascal variants.
  1517.  
  1518. Example
  1519. -------
  1520.  
  1521.      program IfDemo;
  1522.      var
  1523.        Foo, Bar: Boolean;
  1524.      begin
  1525.        Foo := True;
  1526.        Bar := False;
  1527.        if ((1 = 1) or (2 = 3)) and (Foo = not Bar) then
  1528.          begin
  1529.            { This is executed if either Foo is true but not Bar or vice versa }
  1530.            WriteLn ('Either Foo or Bar is true.');
  1531.            if Bar then
  1532.              WriteLn ('You will see this text if Bar is true.')
  1533.          end
  1534.        else { This whole `else' branch is not executed }
  1535.          if 1 = 1 then
  1536.            if True = False then
  1537.              WriteLn ('This text is never written on screen.')
  1538.            else  { Note: This ``else'' belongs to ``if True = False'' }
  1539.              WriteLn ('This text is never written on screen as well.')
  1540.          else  { Note: This ``else'' belongs to ``if 1 = 1'' }
  1541.            WriteLn ('Nor is this.')
  1542.      end.
  1543.  
  1544. See also
  1545. --------
  1546.  
  1547.    *Note if Statement::, *Note else::, *Note then::
  1548.  
  1549. 
  1550. File: gpc.info,  Node: Im,  Next: implementation,  Prev: if,  Up: Reference
  1551.  
  1552. Im
  1553. ==
  1554.  
  1555. Synopsis
  1556. --------
  1557.  
  1558.      function Im (z: Complex): Real;
  1559.  
  1560. Description
  1561. -----------
  1562.  
  1563.    `Im' extracts the imaginary part of the complex number `z'.  The
  1564. result is a real value.
  1565.  
  1566. Conforming to
  1567. -------------
  1568.  
  1569.    `Im' is an ISO-10206 Extended Pascal extension.
  1570.  
  1571. Example
  1572. -------
  1573.  
  1574.      program ImDemo;
  1575.      var
  1576.        z: Complex;
  1577.      begin
  1578.        z := Cmplx (1, 2);  { 1 + i * 2 }
  1579.        WriteLn (Im (z) : 0 : 5)  { 2.00000 }
  1580.      end.
  1581.  
  1582. See also
  1583. --------
  1584.  
  1585.    *Note Cmplx::, *Note Re::, *Note Arg::.
  1586.  
  1587. 
  1588. File: gpc.info,  Node: implementation,  Next: import,  Prev: Im,  Up: Reference
  1589.  
  1590. implementation
  1591. ==============
  1592.  
  1593.    (Under construction.)
  1594.  
  1595. Synopsis
  1596. --------
  1597.  
  1598. Description
  1599. -----------
  1600.  
  1601. Conforming to
  1602. -------------
  1603.  
  1604. Example
  1605. -------
  1606.  
  1607. See also
  1608. --------
  1609.  
  1610. 
  1611. File: gpc.info,  Node: import,  Next: in,  Prev: implementation,  Up: Reference
  1612.  
  1613. import
  1614. ======
  1615.  
  1616. Synopsis
  1617. --------
  1618.  
  1619.      program @@fragment foo;
  1620.      
  1621.      import
  1622.        bar1;
  1623.        bar3 (baz1 => glork1) in 'baz.pas';
  1624.        bar2 only (baz2, baz3 => glork2);
  1625.      
  1626.      [...]
  1627.  
  1628. Description
  1629. -----------
  1630.  
  1631.    The reserved word `import' in the _import part_ of a program makes
  1632. the program import an interface.
  1633.  
  1634.    The `in' above tells GPC to look for the module in the specified
  1635. file; otherwise the file name is derived from the name of the interface
  1636. by adding first `.p', then `.pas' - which only works if the name of the
  1637. exported interface coincides with the file name.
  1638.  
  1639.    The symbol `=>' denotes import renaming: The entity which is
  1640. exported under the name `baz1' by the interface `bar3' will be known
  1641. under the new name `glork1' in the program.
  1642.  
  1643.    The `only' qualifier means that only the listed identifiers will be
  1644. imported from the interface. Renaming works together with `only', too.
  1645.  
  1646.    There must be at most one import part in a program.
  1647.  
  1648.    The interfaces needn't be exported by Extended Pascal modules but
  1649. may be UCSD/Borland Pascal units as well.
  1650.  
  1651. Conforming to
  1652. -------------
  1653.  
  1654.    `import' and modules in general are an ISO-10206 Extended Pascal
  1655. extension.
  1656.  
  1657.    GNU Pascal does not yet support `qualified' import.
  1658.  
  1659. Example
  1660. -------
  1661.  
  1662. See also
  1663. --------
  1664.  
  1665.    *Note module::, *Note unit::, *Note uses::.
  1666.  
  1667. 
  1668. File: gpc.info,  Node: in,  Next: Inc,  Prev: import,  Up: Reference
  1669.  
  1670. in
  1671. ==
  1672.  
  1673.    (Under construction.)
  1674.  
  1675. Synopsis
  1676. --------
  1677.  
  1678. Description
  1679. -----------
  1680.  
  1681. Conforming to
  1682. -------------
  1683.  
  1684. Example
  1685. -------
  1686.  
  1687. See also
  1688. --------
  1689.  
  1690. 
  1691. File: gpc.info,  Node: Inc,  Next: Include,  Prev: in,  Up: Reference
  1692.  
  1693. Inc
  1694. ===
  1695.  
  1696. Synopsis
  1697. --------
  1698.  
  1699.    For ordinal types:
  1700.      procedure Inc (var x: ORDINAL TYPE);
  1701.    or
  1702.      procedure Inc (var x: ORDINAL TYPE; Amount: Integer);
  1703.  
  1704.    For pointer types:
  1705.      procedure Inc (var p: ANY POINTER TYPE);
  1706.    or
  1707.      procedure Inc (var p: ANY POINTER TYPE; Amount: Integer);
  1708.  
  1709. Description
  1710. -----------
  1711.  
  1712.    For ordinal types, `inc' increases the value of `x' by one or by
  1713. `amount' if it is given.
  1714.  
  1715.    If the argument `p' is pointing to a specified type (typed pointer),
  1716. `inc' increases the address of `p' by the size of the type `p' is
  1717. pointing to or by `amount' times that size respectively. If `p' is an
  1718. untyped pointer (i.e. `p' is of type *Note Pointer::), `p' is increased
  1719. by one.
  1720.  
  1721. Conforming to
  1722. -------------
  1723.  
  1724.    `Inc' is a Borland Pascal extension.  Yet application of `Inc' to
  1725. pointers is defined in Borland Pascal.  The combination of the second
  1726. argument with application to pointers is a GNU extension.
  1727.  
  1728. Example
  1729. -------
  1730.  
  1731.      program IncDemo;
  1732.      var
  1733.        Foo: Integer;
  1734.        Bar: array [1 .. 5] of Integer;
  1735.        Baz: ^Integer;
  1736.      begin
  1737.        Foo := 4;
  1738.        Inc (Foo, 5);      { yields 9 }
  1739.        {$X+}              { Turn on extended systax }
  1740.        Baz := @Bar [1];  { Baz points to y [1] }
  1741.        Inc (Baz, 2);      { Baz points to y [3] }
  1742.      end.
  1743.  
  1744. See also
  1745. --------
  1746.  
  1747.    *Note Dec::, *Note Pred::, *Note Succ::, *Note Pointer Arithmetics::.
  1748.  
  1749. 
  1750. File: gpc.info,  Node: Include,  Next: Index,  Prev: Inc,  Up: Reference
  1751.  
  1752. Include
  1753. =======
  1754.  
  1755.    (Under construction.)
  1756.  
  1757. Synopsis
  1758. --------
  1759.  
  1760. Description
  1761. -----------
  1762.  
  1763. Conforming to
  1764. -------------
  1765.  
  1766. Example
  1767. -------
  1768.  
  1769. See also
  1770. --------
  1771.  
  1772. 
  1773. File: gpc.info,  Node: Index,  Next: inherited,  Prev: Include,  Up: Reference
  1774.  
  1775. Index
  1776. =====
  1777.  
  1778.    (Under construction.)
  1779.  
  1780. Synopsis
  1781. --------
  1782.  
  1783. Description
  1784. -----------
  1785.  
  1786. Conforming to
  1787. -------------
  1788.  
  1789. Example
  1790. -------
  1791.  
  1792. See also
  1793. --------
  1794.  
  1795. 
  1796. File: gpc.info,  Node: inherited,  Next: inline,  Prev: Index,  Up: Reference
  1797.  
  1798. inherited
  1799. =========
  1800.  
  1801.    (Under construction.)
  1802.  
  1803. Synopsis
  1804. --------
  1805.  
  1806. Description
  1807. -----------
  1808.  
  1809. Conforming to
  1810. -------------
  1811.  
  1812. Example
  1813. -------
  1814.  
  1815. See also
  1816. --------
  1817.  
  1818. 
  1819. File: gpc.info,  Node: inline,  Next: InOutRes,  Prev: inherited,  Up: Reference
  1820.  
  1821. inline
  1822. ======
  1823.  
  1824.    (Under construction.)
  1825.  
  1826. Synopsis
  1827. --------
  1828.  
  1829. Description
  1830. -----------
  1831.  
  1832. Conforming to
  1833. -------------
  1834.  
  1835. Example
  1836. -------
  1837.  
  1838. See also
  1839. --------
  1840.  
  1841. 
  1842. File: gpc.info,  Node: InOutRes,  Next: InOutResStr,  Prev: inline,  Up: Reference
  1843.  
  1844. InOutRes
  1845. ========
  1846.  
  1847.    (Under construction.)
  1848.  
  1849. Synopsis
  1850. --------
  1851.  
  1852.      var
  1853.        InOutRes: Integer;
  1854.  
  1855. Description
  1856. -----------
  1857.  
  1858. Conforming to
  1859. -------------
  1860.  
  1861. Example
  1862. -------
  1863.  
  1864. See also
  1865. --------
  1866.  
  1867. 
  1868. File: gpc.info,  Node: InOutResStr,  Next: Input,  Prev: InOutRes,  Up: Reference
  1869.  
  1870. InOutResStr
  1871. ===========
  1872.  
  1873.    (Under construction.)
  1874.  
  1875. Synopsis
  1876. --------
  1877.  
  1878.      var
  1879.        InOutResStr: CString;
  1880.  
  1881. Description
  1882. -----------
  1883.  
  1884. Conforming to
  1885. -------------
  1886.  
  1887. Example
  1888. -------
  1889.  
  1890. See also
  1891. --------
  1892.  
  1893. 
  1894. File: gpc.info,  Node: Input,  Next: Insert,  Prev: InOutResStr,  Up: Reference
  1895.  
  1896. Input
  1897. =====
  1898.  
  1899.    (Under construction.)
  1900.  
  1901. Synopsis
  1902. --------
  1903.  
  1904.      var
  1905.        Input: Text;
  1906.  
  1907. Description
  1908. -----------
  1909.  
  1910. Conforming to
  1911. -------------
  1912.  
  1913. Example
  1914. -------
  1915.  
  1916. See also
  1917. --------
  1918.  
  1919. 
  1920. File: gpc.info,  Node: Insert,  Next: Int,  Prev: Input,  Up: Reference
  1921.  
  1922. Insert
  1923. ======
  1924.  
  1925.    (Under construction.)
  1926.  
  1927. Synopsis
  1928. --------
  1929.  
  1930.      procedure Insert (Source: String; var Dest: String; Position: Integer);
  1931.  
  1932. Description
  1933. -----------
  1934.  
  1935. Conforming to
  1936. -------------
  1937.  
  1938. Example
  1939. -------
  1940.  
  1941. See also
  1942. --------
  1943.  
  1944. 
  1945. File: gpc.info,  Node: Int,  Next: Integer,  Prev: Insert,  Up: Reference
  1946.  
  1947. Int
  1948. ===
  1949.  
  1950.    (Under construction.)
  1951.  
  1952. Synopsis
  1953. --------
  1954.  
  1955.      function Int (x: Real): Real;
  1956.  
  1957. Description
  1958. -----------
  1959.  
  1960. Conforming to
  1961. -------------
  1962.  
  1963. Example
  1964. -------
  1965.  
  1966. See also
  1967. --------
  1968.  
  1969. 
  1970. File: gpc.info,  Node: Integer,  Next: interface,  Prev: Int,  Up: Reference
  1971.  
  1972. Integer
  1973. =======
  1974.  
  1975. Synopsis
  1976. --------
  1977.  
  1978.      type
  1979.        Integer  { built-in type }
  1980.    or
  1981.      type
  1982.        Integer (n)  { built-in type class }
  1983.  
  1984. Description
  1985. -----------
  1986.  
  1987.    `Integer' is the "natural" signed integer type in GNU Pascal.  On
  1988. most platforms it is 32 bits wide and thus has a range of
  1989. `-2147483648..2147483647'.  Use it whenever you need a general-purpose
  1990. signed integer type.
  1991.  
  1992.    As an extension, GPC allows to use `Integer' as a pseudo-schema to
  1993. produce types with a specified size in bits; for example
  1994.  
  1995.      type
  1996.        Int16 = Integer (16);
  1997.  
  1998.    defines an integer type with 16 bits.  The same mechanism works for
  1999. `Cardinal' and `Word', too.
  2000.  
  2001.    `Integer' in GNU Pascal is compatible to `Int' in GNU C.
  2002.  
  2003.    There are lots of other integer types in GPC, see *Note Integer
  2004. Types::.
  2005.  
  2006. Conforming to
  2007. -------------
  2008.  
  2009.    In ISO Pascal, `Integer' is the only built-in integer type.
  2010. (However see *Note Subrange Types::.)
  2011.  
  2012. Example
  2013. -------
  2014.  
  2015.      program IntegerDemo;
  2016.      var
  2017.        a: Integer;
  2018.      begin
  2019.        a := 42;
  2020.        WriteLn (a)
  2021.      end.
  2022.  
  2023. See also
  2024. --------
  2025.  
  2026.    *Note Integer Types::, *Note Subrange Types::.
  2027.  
  2028. 
  2029. File: gpc.info,  Node: interface,  Next: interrupt,  Prev: Integer,  Up: Reference
  2030.  
  2031. interface
  2032. =========
  2033.  
  2034.    (Under construction.)
  2035.  
  2036. Synopsis
  2037. --------
  2038.  
  2039. Description
  2040. -----------
  2041.  
  2042. Conforming to
  2043. -------------
  2044.  
  2045. Example
  2046. -------
  2047.  
  2048. See also
  2049. --------
  2050.  
  2051. 
  2052. File: gpc.info,  Node: interrupt,  Next: IOResult,  Prev: interface,  Up: Reference
  2053.  
  2054. interrupt
  2055. =========
  2056.  
  2057.    Not yet implemented.
  2058.  
  2059. Synopsis
  2060. --------
  2061.  
  2062. Description
  2063. -----------
  2064.  
  2065. Conforming to
  2066. -------------
  2067.  
  2068. Example
  2069. -------
  2070.  
  2071. See also
  2072. --------
  2073.  
  2074. 
  2075. File: gpc.info,  Node: IOResult,  Next: is,  Prev: interrupt,  Up: Reference
  2076.  
  2077. IOResult
  2078. ========
  2079.  
  2080.    (Under construction.)
  2081.  
  2082. Synopsis
  2083. --------
  2084.  
  2085.      function IOResult: Integer;
  2086.  
  2087. Description
  2088. -----------
  2089.  
  2090. Conforming to
  2091. -------------
  2092.  
  2093. Example
  2094. -------
  2095.  
  2096. See also
  2097. --------
  2098.  
  2099. 
  2100. File: gpc.info,  Node: is,  Next: label,  Prev: IOResult,  Up: Reference
  2101.  
  2102. is
  2103. ==
  2104.  
  2105.    Not yet implemented.
  2106.  
  2107. Synopsis
  2108. --------
  2109.  
  2110. Description
  2111. -----------
  2112.  
  2113. Conforming to
  2114. -------------
  2115.  
  2116. Example
  2117. -------
  2118.  
  2119. See also
  2120. --------
  2121.  
  2122. 
  2123. File: gpc.info,  Node: label,  Next: LastPosition,  Prev: is,  Up: Reference
  2124.  
  2125. label
  2126. =====
  2127.  
  2128.    (Under construction.)
  2129.  
  2130. Synopsis
  2131. --------
  2132.  
  2133. Description
  2134. -----------
  2135.  
  2136. Conforming to
  2137. -------------
  2138.  
  2139. Example
  2140. -------
  2141.  
  2142. See also
  2143. --------
  2144.  
  2145. 
  2146. File: gpc.info,  Node: LastPosition,  Next: LE,  Prev: label,  Up: Reference
  2147.  
  2148. LastPosition
  2149. ============
  2150.  
  2151.    (Under construction.)
  2152.  
  2153. Synopsis
  2154. --------
  2155.  
  2156.      function LastPosition (var F: TYPED FILE): Integer;
  2157.  
  2158. Description
  2159. -----------
  2160.  
  2161. Conforming to
  2162. -------------
  2163.  
  2164. Example
  2165. -------
  2166.  
  2167. See also
  2168. --------
  2169.  
  2170. 
  2171. File: gpc.info,  Node: LE,  Next: Length,  Prev: LastPosition,  Up: Reference
  2172.  
  2173. LE
  2174. ==
  2175.  
  2176.    (Under construction.)
  2177.  
  2178. Synopsis
  2179. --------
  2180.  
  2181.      function LE (S1, S2: String): Boolean;
  2182.  
  2183. Description
  2184. -----------
  2185.  
  2186. Conforming to
  2187. -------------
  2188.  
  2189. Example
  2190. -------
  2191.  
  2192. See also
  2193. --------
  2194.  
  2195. 
  2196. File: gpc.info,  Node: Length,  Next: library,  Prev: LE,  Up: Reference
  2197.  
  2198. Length
  2199. ======
  2200.  
  2201.    (Under construction.)
  2202.  
  2203. Synopsis
  2204. --------
  2205.  
  2206.      function Length (S: String): Integer;
  2207.  
  2208. Description
  2209. -----------
  2210.  
  2211. Conforming to
  2212. -------------
  2213.  
  2214. Example
  2215. -------
  2216.  
  2217. See also
  2218. --------
  2219.  
  2220. 
  2221. File: gpc.info,  Node: library,  Next: Ln,  Prev: Length,  Up: Reference
  2222.  
  2223. library
  2224. =======
  2225.  
  2226.    Not yet implemented.
  2227.  
  2228. Synopsis
  2229. --------
  2230.  
  2231. Description
  2232. -----------
  2233.  
  2234. Conforming to
  2235. -------------
  2236.  
  2237. Example
  2238. -------
  2239.  
  2240. See also
  2241. --------
  2242.  
  2243. 
  2244. File: gpc.info,  Node: Ln,  Next: LoCase,  Prev: library,  Up: Reference
  2245.  
  2246. Ln
  2247. ==
  2248.  
  2249. Synopsis
  2250. --------
  2251.  
  2252.      function Ln (x: Real): Real;
  2253.    or
  2254.      function Ln (z: Complex): Complex;
  2255.  
  2256. Description
  2257. -----------
  2258.  
  2259.    The natural logarith `Ln' is the logarithm with base e, where e is
  2260. the Euler number e = Exp (1) = 2.718281828...
  2261.  
  2262. Conforming to
  2263. -------------
  2264.  
  2265.    The function `Ln' is defined in ISO-7185 Standard Pascal; its
  2266. application to complex values is defined in ISO-10206 Extended Pascal.
  2267.  
  2268. Example
  2269. -------
  2270.  
  2271.      program LnDemo;
  2272.      var
  2273.        z: Complex;
  2274.      begin
  2275.        z := Cmplx (1, 1);
  2276.        z := Ln (z)  { yields Ln (SqRt (2)) + i * Pi / 4 }
  2277.                     { since Ln (i * x) = Ln Abs (x) + i * Arg (x) }
  2278.      end.
  2279.  
  2280. See also
  2281. --------
  2282.  
  2283. 
  2284. File: gpc.info,  Node: LoCase,  Next: LongBool,  Prev: Ln,  Up: Reference
  2285.  
  2286. LoCase
  2287. ======
  2288.  
  2289.    (Under construction.)
  2290.  
  2291. Synopsis
  2292. --------
  2293.  
  2294.      function LoCase (Ch: Char): Char;
  2295.  
  2296. Description
  2297. -----------
  2298.  
  2299. Conforming to
  2300. -------------
  2301.  
  2302. Example
  2303. -------
  2304.  
  2305. See also
  2306. --------
  2307.  
  2308. 
  2309. File: gpc.info,  Node: LongBool,  Next: LongCard,  Prev: LoCase,  Up: Reference
  2310.  
  2311. LongBool
  2312. ========
  2313.  
  2314.    (Under construction.)
  2315.  
  2316. Synopsis
  2317. --------
  2318.  
  2319.      type
  2320.        LongBool = Boolean (BitSizeOf (LongInt));
  2321.  
  2322. Description
  2323. -----------
  2324.  
  2325. Conforming to
  2326. -------------
  2327.  
  2328. Example
  2329. -------
  2330.  
  2331.      program LongBoolDemo;
  2332.      var
  2333.        a: LongBool;
  2334.      begin
  2335.        LongInt (a) := 1;
  2336.        if a then WriteLn ('Ord (True) = 1')
  2337.      end.
  2338.  
  2339. See also
  2340. --------
  2341.  
  2342. 
  2343. File: gpc.info,  Node: LongCard,  Next: LongestBool,  Prev: LongBool,  Up: Reference
  2344.  
  2345. LongCard
  2346. ========
  2347.  
  2348. Synopsis
  2349. --------
  2350.  
  2351.      type
  2352.        LongCard = Cardinal (BitSizeOf (LongInt));
  2353.  
  2354. Description
  2355. -----------
  2356.  
  2357.    `LongCard' is an unsigned integer type which is longer than
  2358. `Cardinal'.  On most platforms it is 64 bits wide and thus has a range
  2359. of `0..18446744073709551615'.
  2360.  
  2361.    `LongCard' in GNU Pascal is compatible to `long long unsigned int'
  2362. in GNU C.
  2363.  
  2364.    There are lots of other integer types in GPC, see *Note Integer
  2365. Types::.
  2366.  
  2367. Conforming to
  2368. -------------
  2369.  
  2370.    `LongCard' is a GNU Pascal extension.
  2371.  
  2372. Example
  2373. -------
  2374.  
  2375.      program LongCardDemo;
  2376.      var
  2377.        a: LongCard;
  2378.      begin
  2379.        a := 42;
  2380.        WriteLn (a)
  2381.      end.
  2382.  
  2383. See also
  2384. --------
  2385.  
  2386.    *Note Integer Types::, *Note Subrange Types::.
  2387.  
  2388. 
  2389. File: gpc.info,  Node: LongestBool,  Next: LongestCard,  Prev: LongCard,  Up: Reference
  2390.  
  2391. LongestBool
  2392. ===========
  2393.  
  2394.    (Under construction.)
  2395.  
  2396. Synopsis
  2397. --------
  2398.  
  2399.      type
  2400.        LongestBool = Boolean (BitSizeOf (LongestInt));
  2401.  
  2402. Description
  2403. -----------
  2404.  
  2405. Conforming to
  2406. -------------
  2407.  
  2408. Example
  2409. -------
  2410.  
  2411.      program LongestBoolDemo;
  2412.      var
  2413.        a: LongestBool;
  2414.      begin
  2415.        LongestInt (a) := 1;
  2416.        if a then WriteLn ('Ord (True) = 1')
  2417.      end.
  2418.  
  2419. See also
  2420. --------
  2421.  
  2422. 
  2423. File: gpc.info,  Node: LongestCard,  Next: LongestInt,  Prev: LongestBool,  Up: Reference
  2424.  
  2425. LongestCard
  2426. ===========
  2427.  
  2428. Synopsis
  2429. --------
  2430.  
  2431.      type
  2432.        LongestCard = Cardinal (BitSizeOf (LongestInt));
  2433.  
  2434. Description
  2435. -----------
  2436.  
  2437.    `LongestCard' is GPC's longest-possible unsigned integer type.
  2438. Currently, this is the same as *Note LongCard::.  On most platforms it
  2439. is 64 bits wide and thus has a range of `0..18446744073709551615'.
  2440.  
  2441.    There are lots of other integer types in GPC, see *Note Integer
  2442. Types::.
  2443.  
  2444. Conforming to
  2445. -------------
  2446.  
  2447.    `LongestCard' is a GNU Pascal extension.
  2448.  
  2449. Example
  2450. -------
  2451.  
  2452.      program LongestCardDemo;
  2453.      var
  2454.        a: LongestCard;
  2455.      begin
  2456.        a := 42;
  2457.        WriteLn (a)
  2458.      end.
  2459.  
  2460. See also
  2461. --------
  2462.  
  2463.    *Note Integer Types::, *Note Subrange Types::.
  2464.  
  2465. 
  2466. File: gpc.info,  Node: LongestInt,  Next: LongestReal,  Prev: LongestCard,  Up: Reference
  2467.  
  2468. LongestInt
  2469. ==========
  2470.  
  2471. Synopsis
  2472. --------
  2473.  
  2474.      type
  2475.        LongestInt = LongInt;  { might get bigger than LongInt someday }
  2476.  
  2477. Description
  2478. -----------
  2479.  
  2480.    `LongestInt' is GPC's longest-possible signed integer type.
  2481. Currently, this is the same as *Note LongInt::.  On most platforms it
  2482. is 64 bits wide and thus has a range of
  2483. `-9223372036854775808..9223372036854775807'.
  2484.  
  2485.    There are lots of other integer types in GPC, see *Note Integer
  2486. Types::.
  2487.  
  2488. Conforming to
  2489. -------------
  2490.  
  2491.    `LongestInt' is a GNU Pascal extension.
  2492.  
  2493. Example
  2494. -------
  2495.  
  2496.      program LongestIntDemo;
  2497.      var
  2498.        a: LongestInt;
  2499.      begin
  2500.        a := 42;
  2501.        WriteLn (a)
  2502.      end.
  2503.  
  2504. See also
  2505. --------
  2506.  
  2507.    *Note Integer Types::, *Note Subrange Types::.
  2508.  
  2509. 
  2510. File: gpc.info,  Node: LongestReal,  Next: LongestWord,  Prev: LongestInt,  Up: Reference
  2511.  
  2512. LongestReal
  2513. ===========
  2514.  
  2515.    (Under construction.)
  2516.  
  2517. Synopsis
  2518. --------
  2519.  
  2520.      type
  2521.        LongestReal = LongReal;  { might get bigger than LongReal someday }
  2522.  
  2523. Description
  2524. -----------
  2525.  
  2526. Conforming to
  2527. -------------
  2528.  
  2529. Example
  2530. -------
  2531.  
  2532.      program LongestRealDemo;
  2533.      var
  2534.        a: LongestReal;
  2535.      begin
  2536.        a := 42;
  2537.        WriteLn (a)
  2538.      end.
  2539.  
  2540. See also
  2541. --------
  2542.  
  2543. 
  2544. File: gpc.info,  Node: LongestWord,  Next: LongInt,  Prev: LongestReal,  Up: Reference
  2545.  
  2546. LongestWord
  2547. ===========
  2548.  
  2549. Synopsis
  2550. --------
  2551.  
  2552.      type
  2553.        LongestWord = LongestCard;
  2554.  
  2555. Description
  2556. -----------
  2557.  
  2558.    `LongestWord' is GPC's longest-possible unsigned integer type.
  2559. Currently, this is the same as *Note LongWord::.  On most platforms it
  2560. is 64 bits wide and thus has a range of `0..18446744073709551615'.  (It
  2561. is the same as *Note LongestCard::.)
  2562.  
  2563.    There are lots of other integer types in GPC, see *Note Integer
  2564. Types::.
  2565.  
  2566. Conforming to
  2567. -------------
  2568.  
  2569.    `LongestWord' is a GNU Pascal extension.
  2570.  
  2571. Example
  2572. -------
  2573.  
  2574.      program LongestWordDemo;
  2575.      var
  2576.        a: LongestWord;
  2577.      begin
  2578.        a := 42;
  2579.        WriteLn (a)
  2580.      end.
  2581.  
  2582. See also
  2583. --------
  2584.  
  2585.    *Note Integer Types::, *Note Subrange Types::.
  2586.  
  2587. 
  2588. File: gpc.info,  Node: LongInt,  Next: LongReal,  Prev: LongestWord,  Up: Reference
  2589.  
  2590. LongInt
  2591. =======
  2592.  
  2593. Synopsis
  2594. --------
  2595.  
  2596.      type
  2597.        LongInt  { built-in type }
  2598.  
  2599. Description
  2600. -----------
  2601.  
  2602.    `LongInt' is a signed integer type which is longer than `Integer'.
  2603. On most platforms it is 64 bits wide and thus has a range of
  2604. `-9223372036854775808..9223372036854775807'.
  2605.  
  2606.    `LongInt' in GNU Pascal is compatible to `long long int' in GNU C.
  2607.  
  2608.    There are lots of other integer types in GPC, see *Note Integer
  2609. Types::.
  2610.  
  2611. Conforming to
  2612. -------------
  2613.  
  2614.    `LongInt' is a Borland Pascal extension.  Borland Pascal defines
  2615. `LongInt' as a 32-bit signed integer type (*Note Integer:: in GNU
  2616. Pascal).
  2617.  
  2618. Example
  2619. -------
  2620.  
  2621.      program LongIntDemo;
  2622.      var
  2623.        a: LongInt;
  2624.      begin
  2625.        a := 42;
  2626.        WriteLn (a)
  2627.      end.
  2628.  
  2629. See also
  2630. --------
  2631.  
  2632.    *Note Integer Types::, *Note Subrange Types::.
  2633.  
  2634. 
  2635. File: gpc.info,  Node: LongReal,  Next: LongWord,  Prev: LongInt,  Up: Reference
  2636.  
  2637. LongReal
  2638. ========
  2639.  
  2640.    (Under construction.)
  2641.  
  2642. Synopsis
  2643. --------
  2644.  
  2645.      type
  2646.        LongReal  { built-in type }
  2647.  
  2648. Description
  2649. -----------
  2650.  
  2651. Conforming to
  2652. -------------
  2653.  
  2654. Example
  2655. -------
  2656.  
  2657.      program LongRealDemo;
  2658.      var
  2659.        a: LongReal;
  2660.      begin
  2661.        a := 42;
  2662.        WriteLn (a)
  2663.      end.
  2664.  
  2665. See also
  2666. --------
  2667.  
  2668. 
  2669. File: gpc.info,  Node: LongWord,  Next: Low,  Prev: LongReal,  Up: Reference
  2670.  
  2671. LongWord
  2672. ========
  2673.  
  2674. Synopsis
  2675. --------
  2676.  
  2677.      type
  2678.        LongWord = LongCard;
  2679.  
  2680. Description
  2681. -----------
  2682.  
  2683.    `LongWord' is an unsigned integer type which is larger than `Word'.
  2684. On most platforms it is 64 bits wide and thus has a range of
  2685. `0..18446744073709551615'.  It is the same as *Note LongCard::.
  2686.  
  2687.    `LongWord' in GNU Pascal is compatible to `long long unsigned int'
  2688. in GNU C.
  2689.  
  2690.    There are lots of other integer types in GPC, see *Note Integer
  2691. Types::.
  2692.  
  2693. Conforming to
  2694. -------------
  2695.  
  2696.    `LongWord' is a GNU Pascal extension.
  2697.  
  2698. Example
  2699. -------
  2700.  
  2701.      program LongWordDemo;
  2702.      var
  2703.        a: LongWord;
  2704.      begin
  2705.        a := 42;
  2706.        WriteLn (a)
  2707.      end.
  2708.  
  2709. See also
  2710. --------
  2711.  
  2712.    *Note Integer Types::, *Note Subrange Types::.
  2713.  
  2714. 
  2715. File: gpc.info,  Node: Low,  Next: LT,  Prev: LongWord,  Up: Reference
  2716.  
  2717. Low
  2718. ===
  2719.  
  2720. Synopsis
  2721. --------
  2722.  
  2723.      function Low (ORDINAL TYPE OR VARIABLE): ORDINAL TYPE;
  2724.    or
  2725.      function Low (ARRAY TYPE OR VARIABLE): ARRAY ELEMENT TYPE;
  2726.    or
  2727.      function Low (STRING VARIABLE): Integer;
  2728.  
  2729. Description
  2730. -----------
  2731.  
  2732.    For ordinal types or variables of that type, `Low' returns the
  2733. lowest value a variable of that type can assume.
  2734.  
  2735.    For array types or variables of that type, `Low' returns the lowest
  2736. index a variable of that type can assume. Note: the result is of the
  2737. same type as the array index is. If the array has more than one
  2738. dimension, `Low' returns the lowest index in the first dimension.
  2739.  
  2740.    If the argument is a string variable, `Low' returns one.
  2741.  
  2742. Conforming to
  2743. -------------
  2744.  
  2745. Example
  2746. -------
  2747.  
  2748.      program LowDemo;
  2749.      type
  2750.        Colors = (Red, Green, Blue);
  2751.      var
  2752.        Col: array [12 .. 20] of Colors;
  2753.        Foo: 12 .. 20;
  2754.        Bar: Integer;
  2755.      begin
  2756.        Foo := Low (Col);              { returns 12 }
  2757.        Col [Foo] := Low (Col [Foo]);  { returns Red }
  2758.        Bar := Low (Integer)           { returns lowest ``Integer'' value }
  2759.      end.
  2760.  
  2761. See also
  2762. --------
  2763.  
  2764.    *Note High::
  2765.  
  2766. 
  2767. File: gpc.info,  Node: LT,  Next: Mark,  Prev: Low,  Up: Reference
  2768.  
  2769. LT
  2770. ==
  2771.  
  2772.    (Under construction.)
  2773.  
  2774. Synopsis
  2775. --------
  2776.  
  2777.      function LT (S1, S2: String): Boolean;
  2778.  
  2779. Description
  2780. -----------
  2781.  
  2782. Conforming to
  2783. -------------
  2784.  
  2785. Example
  2786. -------
  2787.  
  2788. See also
  2789. --------
  2790.  
  2791. 
  2792. File: gpc.info,  Node: Mark,  Next: Max,  Prev: LT,  Up: Reference
  2793.  
  2794. Mark
  2795. ====
  2796.  
  2797.    (Under construction.)
  2798.  
  2799. Synopsis
  2800. --------
  2801.  
  2802.      procedure Mark (var P: Pointer);
  2803.  
  2804. Description
  2805. -----------
  2806.  
  2807. Conforming to
  2808. -------------
  2809.  
  2810. Example
  2811. -------
  2812.  
  2813. See also
  2814. --------
  2815.  
  2816. 
  2817. File: gpc.info,  Node: Max,  Next: MaxChar,  Prev: Mark,  Up: Reference
  2818.  
  2819. Max
  2820. ===
  2821.  
  2822.    (Under construction.)
  2823.  
  2824. Synopsis
  2825. --------
  2826.  
  2827.      function Max (x1, x2: ORDINAL OR REAL TYPE): SAME TYPE;
  2828.  
  2829. Description
  2830. -----------
  2831.  
  2832. Conforming to
  2833. -------------
  2834.  
  2835. Example
  2836. -------
  2837.  
  2838. See also
  2839. --------
  2840.  
  2841. 
  2842. File: gpc.info,  Node: MaxChar,  Next: MaxInt,  Prev: Max,  Up: Reference
  2843.  
  2844. MaxChar
  2845. =======
  2846.  
  2847.    (Under construction.)
  2848.  
  2849. Synopsis
  2850. --------
  2851.  
  2852. Description
  2853. -----------
  2854.  
  2855. Conforming to
  2856. -------------
  2857.  
  2858. Example
  2859. -------
  2860.  
  2861. See also
  2862. --------
  2863.  
  2864. 
  2865. File: gpc.info,  Node: MaxInt,  Next: MaxReal,  Prev: MaxChar,  Up: Reference
  2866.  
  2867. MaxInt
  2868. ======
  2869.  
  2870.    (Under construction.)
  2871.  
  2872. Synopsis
  2873. --------
  2874.  
  2875. Description
  2876. -----------
  2877.  
  2878. Conforming to
  2879. -------------
  2880.  
  2881. Example
  2882. -------
  2883.  
  2884. See also
  2885. --------
  2886.  
  2887. 
  2888. File: gpc.info,  Node: MaxReal,  Next: MedBool,  Prev: MaxInt,  Up: Reference
  2889.  
  2890. MaxReal
  2891. =======
  2892.  
  2893.    (Under construction.)
  2894.  
  2895. Synopsis
  2896. --------
  2897.  
  2898. Description
  2899. -----------
  2900.  
  2901. Conforming to
  2902. -------------
  2903.  
  2904. Example
  2905. -------
  2906.  
  2907. See also
  2908. --------
  2909.  
  2910. 
  2911. File: gpc.info,  Node: MedBool,  Next: MedCard,  Prev: MaxReal,  Up: Reference
  2912.  
  2913. MedBool
  2914. =======
  2915.  
  2916.    (Under construction.)
  2917.  
  2918. Synopsis
  2919. --------
  2920.  
  2921.      type
  2922.        MedBool = Boolean (BitSizeOf (MedInt));
  2923.  
  2924. Description
  2925. -----------
  2926.  
  2927. Conforming to
  2928. -------------
  2929.  
  2930. Example
  2931. -------
  2932.  
  2933.      program MedBoolDemo;
  2934.      var
  2935.        a: MedBool;
  2936.      begin
  2937.        MedInt (a) := 1;
  2938.        if a then WriteLn ('Ord (True) = 1')
  2939.      end.
  2940.  
  2941. See also
  2942. --------
  2943.  
  2944. 
  2945. File: gpc.info,  Node: MedCard,  Next: MedInt,  Prev: MedBool,  Up: Reference
  2946.  
  2947. MedCard
  2948. =======
  2949.  
  2950. Synopsis
  2951. --------
  2952.  
  2953.      type
  2954.        MedCard = Cardinal (BitSizeOf (MedInt));
  2955.  
  2956. Description
  2957. -----------
  2958.  
  2959.    `MedCard' is an unsigned integer type which is not smaller than
  2960. `Cardinal'.  On most platforms it actually is the same as `Cardinal'
  2961. and 32 bits wide and thus has a range of `0..4294967295'.
  2962.  
  2963.    `MedCard' in GNU Pascal is compatible to `long unsigned int' in GNU
  2964. C.  This compatibility is the reason why `MedCard' exists.
  2965.  
  2966.    There are lots of other integer types in GPC, see *Note Integer
  2967. Types::.
  2968.  
  2969. Conforming to
  2970. -------------
  2971.  
  2972.    `MedCard' is a GNU Pascal extension.
  2973.  
  2974. Example
  2975. -------
  2976.  
  2977.      program MedCardDemo;
  2978.      var
  2979.        a: MedCard;
  2980.      begin
  2981.        a := 42;
  2982.        WriteLn (a)
  2983.      end.
  2984.  
  2985. See also
  2986. --------
  2987.  
  2988.    *Note Integer Types::, *Note Subrange Types::.
  2989.  
  2990. 
  2991. File: gpc.info,  Node: MedInt,  Next: MedReal,  Prev: MedCard,  Up: Reference
  2992.  
  2993. MedInt
  2994. ======
  2995.  
  2996. Synopsis
  2997. --------
  2998.  
  2999.      type
  3000.        MedInt  { built-in type }
  3001.  
  3002. Description
  3003. -----------
  3004.  
  3005.    `MedInt' is a signed integer type which is not smaller than
  3006. `Integer'.  On most platforms it actually is the same as `Integer' and
  3007. 32 bits wide and thus has a range of `-2147483648..2147483647'.
  3008.  
  3009.    `MedInt' in GNU Pascal is compatible to `long int' in GNU C.  This
  3010. compatibility is the reason why `MedInt' exists.
  3011.  
  3012.    There are lots of other integer types in GPC, see *Note Integer
  3013. Types::.
  3014.  
  3015. Conforming to
  3016. -------------
  3017.  
  3018.    `MedInt' is a GNU Pascal extension.
  3019.  
  3020. Example
  3021. -------
  3022.  
  3023.      program MedIntDemo;
  3024.      var
  3025.        a: MedInt;
  3026.      begin
  3027.        a := 42;
  3028.        WriteLn (a)
  3029.      end.
  3030.  
  3031. See also
  3032. --------
  3033.  
  3034.    *Note Integer Types::, *Note Subrange Types::.
  3035.  
  3036. 
  3037. File: gpc.info,  Node: MedReal,  Next: MedWord,  Prev: MedInt,  Up: Reference
  3038.  
  3039. MedReal
  3040. =======
  3041.  
  3042.    (Under construction.)
  3043.  
  3044. Synopsis
  3045. --------
  3046.  
  3047.      type
  3048.        MedReal = Real;
  3049.  
  3050. Description
  3051. -----------
  3052.  
  3053. Conforming to
  3054. -------------
  3055.  
  3056. Example
  3057. -------
  3058.  
  3059.      program MedRealDemo;
  3060.      var
  3061.        a: MedReal;
  3062.      begin
  3063.        a := 42;
  3064.        WriteLn (a)
  3065.      end.
  3066.  
  3067. See also
  3068. --------
  3069.  
  3070. 
  3071. File: gpc.info,  Node: MedWord,  Next: Min,  Prev: MedReal,  Up: Reference
  3072.  
  3073. MedWord
  3074. =======
  3075.  
  3076. Synopsis
  3077. --------
  3078.  
  3079.      type
  3080.        MedWord = MedCard;
  3081.  
  3082. Description
  3083. -----------
  3084.  
  3085.    `MedWord' is an unsigned integer type which is not smaller than
  3086. `Word'.  On most platforms it actually is the same as `Word' and 32
  3087. bits wide and thus has a range of `0..4294967295'.  It is the same as
  3088. *Note MedCard::.
  3089.  
  3090.    `MedWord' in GNU Pascal is compatible to `long unsigned int' in GNU
  3091. C.  This compatibility is the reason why `MedWord' exists.
  3092.  
  3093.    There are lots of other integer types in GPC, see *Note Integer
  3094. Types::.
  3095.  
  3096. Conforming to
  3097. -------------
  3098.  
  3099.    `MedWord' is a GNU Pascal extension.
  3100.  
  3101. Example
  3102. -------
  3103.  
  3104.      program MedWordDemo;
  3105.      var
  3106.        a: MedWord;
  3107.      begin
  3108.        a := 42;
  3109.        WriteLn (a)
  3110.      end.
  3111.  
  3112. See also
  3113. --------
  3114.  
  3115.    *Note Integer Types::, *Note Subrange Types::.
  3116.  
  3117. 
  3118. File: gpc.info,  Node: Min,  Next: MinReal,  Prev: MedWord,  Up: Reference
  3119.  
  3120. Min
  3121. ===
  3122.  
  3123.    (Under construction.)
  3124.  
  3125. Synopsis
  3126. --------
  3127.  
  3128.      function Min (x1, x2: ORDINAL OR REAL TYPE): SAME TYPE;
  3129.  
  3130. Description
  3131. -----------
  3132.  
  3133. Conforming to
  3134. -------------
  3135.  
  3136. Example
  3137. -------
  3138.  
  3139. See also
  3140. --------
  3141.  
  3142. 
  3143. File: gpc.info,  Node: MinReal,  Next: MkDir,  Prev: Min,  Up: Reference
  3144.  
  3145. MinReal
  3146. =======
  3147.  
  3148.    (Under construction.)
  3149.  
  3150. Synopsis
  3151. --------
  3152.  
  3153. Description
  3154. -----------
  3155.  
  3156. Conforming to
  3157. -------------
  3158.  
  3159. Example
  3160. -------
  3161.  
  3162. See also
  3163. --------
  3164.  
  3165. 
  3166. File: gpc.info,  Node: MkDir,  Next: mod,  Prev: MinReal,  Up: Reference
  3167.  
  3168. MkDir
  3169. =====
  3170.  
  3171. Synopsis
  3172. --------
  3173.  
  3174.      procedure MkDir (Directory: String);
  3175.  
  3176. Description
  3177. -----------
  3178.  
  3179.    `MkDir' creates the given DIRECTORY, if its argument is a valid
  3180. parameter to the related operating system's function.  Otherwise a
  3181. runtime error is caused.
  3182.  
  3183. Conforming to
  3184. -------------
  3185.  
  3186.    `MkDir' is a Borland Pascal extension.
  3187.  
  3188. Example
  3189. -------
  3190.  
  3191.      program MkDirDemo;
  3192.      var
  3193.        Foo: String (127);
  3194.      begin
  3195.        WriteLn ('Enter directory name to create:');
  3196.        ReadLn (Foo);
  3197.        {$I-}  { Don't abort program on error }
  3198.        MkDir (Foo);
  3199.        if IOResult <> 0 then
  3200.          WriteLn ('Directory `', Foo, ''' could not be created')
  3201.        else
  3202.          WriteLn ('Okay')
  3203.      end.
  3204.  
  3205. See also
  3206. --------
  3207.  
  3208.    *Note ChDir::, *Note RmDir::
  3209.  
  3210. 
  3211. File: gpc.info,  Node: mod,  Next: module,  Prev: MkDir,  Up: Reference
  3212.  
  3213. mod
  3214. ===
  3215.  
  3216.    (Under construction.)
  3217.  
  3218. Synopsis
  3219. --------
  3220.  
  3221.      operator mod (p, q: Integer) = r: Integer;
  3222.  
  3223. Description
  3224. -----------
  3225.  
  3226. Conforming to
  3227. -------------
  3228.  
  3229. Example
  3230. -------
  3231.  
  3232. See also
  3233. --------
  3234.  
  3235. 
  3236. File: gpc.info,  Node: module,  Next: Move,  Prev: mod,  Up: Reference
  3237.  
  3238. module
  3239. ======
  3240.  
  3241.    (Under construction.)
  3242.  
  3243. Synopsis
  3244. --------
  3245.  
  3246. Description
  3247. -----------
  3248.  
  3249. Conforming to
  3250. -------------
  3251.  
  3252. Example
  3253. -------
  3254.  
  3255. See also
  3256. --------
  3257.  
  3258.